home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / gcc / gcc260utilsdoc.lha / gnu / man / man1 / make.1 < prev    next >
Encoding:
Text File  |  1994-07-28  |  9.3 KB  |  265 lines

  1.  
  2.  
  3.  
  4. MAKE(1L)               LOCAL USER COMMANDS               MAKE(1L)
  5.  
  6.  
  7.  
  8. NAME
  9.      make - GNU make utility to maintain groups of programs
  10.  
  11. SYNOPSIS
  12.      make [ -f makefile ] [ option ] ...  target ...
  13.  
  14. WARNING
  15.      This man paage is an extract of  the  documentation  of  _G_N_U
  16.      _m_a_k_e . It is updated only occasionally, because the GNU pro-
  17.      ject does not use nroff.  For complete,  current  documenta-
  18.      tion,  refer  to the Info file make or the DVI file make.dvi
  19.      which are made from the Texinfo source file make.texinfo.
  20.  
  21. DESCRIPTION
  22.      The purpose of the _m_a_k_e utility is  to  determine  automati-
  23.      cally which pieces of a large program need to be recompiled,
  24.      and issue the  commands  to  recompile  them.   This  manual
  25.      describes  the GNU implementation of _m_a_k_e, which was written
  26.      by Richard Stallman and Roland McGrath.  Our examples show C
  27.      programs,  since  they are most common, but you can use _m_a_k_e
  28.      with any programming language whose compiler can be run with
  29.      a  shell command.  In fact, _m_a_k_e is not limited to programs.
  30.      You can use it to describe any task where some files must be
  31.      updated   automatically  from  others  whenever  the  others
  32.      change.
  33.  
  34.      To prepare to use _m_a_k_e, you must write  a  file  called  the
  35.      _m_a_k_e_f_i_l_e  that  describes  the  relationships among files in
  36.      your program, and the states the commands for updating  each
  37.      file.   In  a  program,  typically  the  executable  file is
  38.      updated from object files, which are in turn made by compil-
  39.      ing source files.
  40.  
  41.      Once a suitable makefile exists, each time you  change  some
  42.      source files, this simple shell command:
  43.  
  44.           make
  45.  
  46.      suffices to perform all necessary recompilations.  The  _m_a_k_e
  47.      program   uses   the   makefile  data  base  and  the  last-
  48.      modification times of the files to decide which of the files
  49.      need  to be updated.  For each of those files, it issues the
  50.      commands recorded in the data base.
  51.  
  52.      _m_a_k_e executes commands in the _m_a_k_e_f_i_l_e to update one or more
  53.      target  _n_a_m_e_s,  where _n_a_m_e is typically a program.  If no -f
  54.      option is present, _m_a_k_e will look  for  the  makefiles  _G_N_U_-
  55.      _m_a_k_e_f_i_l_e, _m_a_k_e_f_i_l_e, and _M_a_k_e_f_i_l_e, in that order.
  56.  
  57.      Normally you should call your makefile  either  _m_a_k_e_f_i_l_e  or
  58.      _M_a_k_e_f_i_l_e.   (We  recommend _M_a_k_e_f_i_l_e because it appears prom-
  59.      inently near the beginning of  a  directory  listing,  right
  60.  
  61.  
  62.  
  63. GNU                Last change: 22 August 1989                  1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. MAKE(1L)               LOCAL USER COMMANDS               MAKE(1L)
  71.  
  72.  
  73.  
  74.      near  other  important files such as _R_E_A_D_M_E.) The first name
  75.      checked, _G_N_U_m_a_k_e_f_i_l_e, is not recommended for most makefiles.
  76.      You  should  use  this  name  if you have a makefile that is
  77.      specific to GNU _m_a_k_e, and will not be  understood  by  other
  78.      versions of _m_a_k_e.  If _m_a_k_e_f_i_l_e is `-', the standard input is
  79.      read.
  80.  
  81.      _m_a_k_e updates a target if it depends  on  prerequisite  files
  82.      that  have been modified since the target was last modified,
  83.      or if the target does not exist.
  84.  
  85. OPTIONS
  86.      -b
  87.  
  88.      -m   These options are ignored for compatibility with  other
  89.           versions of _m_a_k_e.
  90.  
  91.      -C _d_i_r
  92.           Change to directory _d_i_r before reading the makefiles or
  93.           doing anything else.  If multiple -C options are speci-
  94.           fied, each is interpreted relative to the previous one:
  95.           -C  /  -C  etc is equivalent to -C /etc.  This is typi-
  96.           cally used with recursive invocations of _m_a_k_e.
  97.  
  98.      -d   Print debugging information in addition to normal  pro-
  99.           cessing.   The  debugging  information says which files
  100.           are being considered for remaking, which file-times are
  101.           being compared and with what results, which files actu-
  102.           ally need to be remade, which implicit rules  are  con-
  103.           sidered  and which are applied---everything interesting
  104.           about how _m_a_k_e decides what to do.
  105.  
  106.      -e   Give variables taken from  the  environment  precedence
  107.           over variables from makefiles.
  108.  
  109.      -f _f_i_l_e
  110.           Use _f_i_l_e as a makefile.
  111.  
  112.      -i   Ignore all errors in commands executed to remake files.
  113.  
  114.      -I _d_i_r
  115.           Specifies  a  directory  _d_i_r  to  search  for  included
  116.           makefiles.   If  several -I options are used to specify
  117.           several directories, the directories  are  searched  in
  118.           the  order  specified.   Unlike  the arguments to other
  119.           flags of _m_a_k_e, directories given with -I flags may come
  120.           directly  after  the flag: -I_d_i_r is allowed, as well as
  121.           -I _d_i_r.  This syntax is allowed for compatibility  with
  122.           the C preprocessor's -I flag.
  123.  
  124.      -j _j_o_b_s
  125.           Specifies  the  number  of  jobs  (commands)   to   run
  126.  
  127.  
  128.  
  129. GNU                Last change: 22 August 1989                  2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. MAKE(1L)               LOCAL USER COMMANDS               MAKE(1L)
  137.  
  138.  
  139.  
  140.           simultaneously.   If  there is more than one -j option,
  141.           the last one is effective.  If the -j option  is  given
  142.           without  an argument, _m_a_k_e will not limit the number of
  143.           jobs that can run simultaneously.
  144.  
  145.      -k   Continue as much as possible after an error.  While the
  146.           target that failed, and those that depend on it, cannot
  147.           be remade, the other dependencies of these targets  can
  148.           be processed all the same.
  149.  
  150.      -l
  151.  
  152.      -l _l_o_a_d
  153.           Specifies that no new jobs (commands) should be started
  154.           if  there  are others jobs running and the load average
  155.           is at least _l_o_a_d (a floating-point  number).   With  no
  156.           argument, removes a previous load limit.
  157.  
  158.      -n   Print the commands that would be executed, but  do  not
  159.           execute them.
  160.  
  161.      -o _f_i_l_e
  162.           Do not remake the file _f_i_l_e even if it  is  older  than
  163.           its dependencies, and do not remake anything on account
  164.           of changes in _f_i_l_e.  Essentially the file is treated as
  165.           very old and its rules are ignored.
  166.  
  167.      -p   Print the data base (rules and  variable  values)  that
  168.           results  from  reading  the  makefiles; then execute as
  169.           usual or as otherwise specified.  This also prints  the
  170.           version information given by the -v switch (see below).
  171.           To print the data base without  trying  to  remake  any
  172.           files, use make -p -f/_d_e_v/_n_u_l_l.
  173.  
  174.      -q   ``Question mode''.  Do not run any commands,  or  print
  175.           anything;  just  return  an exit status that is zero if
  176.           the specified targets are already up to  date,  nonzero
  177.           otherwise.
  178.  
  179.      -r   Eliminate use of the  built-in  implicit  rules.   Also
  180.           clear  out  the  default  list  of  suffixes for suffix
  181.           rules.
  182.  
  183.      -s   Silent operation; do not print the commands as they are
  184.           executed.
  185.  
  186.      -S   Cancel the effect of the  -k  option.   This  is  never
  187.           necessary  except in a recursive _m_a_k_e where -k might be
  188.           inherited from the top-level _m_a_k_e via MAKEFLAGS  or  if
  189.           you set -k in MAKEFLAGS in your environment.
  190.  
  191.      -t   Touch files  (mark  them  up  to  date  without  really
  192.  
  193.  
  194.  
  195. GNU                Last change: 22 August 1989                  3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. MAKE(1L)               LOCAL USER COMMANDS               MAKE(1L)
  203.  
  204.  
  205.  
  206.           changing them) instead of running their commands.  This
  207.           is used to pretend that  the  commands  were  done,  in
  208.           order to fool future invocations of _m_a_k_e.
  209.  
  210.      -v   Print the version of the _m_a_k_e program plus a copyright,
  211.           a  list  of  authors and a notice that there is no war-
  212.           ranty.  After this information is  printed,  processing
  213.           continues  normally.   To  get this information without
  214.           doing anything else, use make -v -f/_d_e_v/_n_u_l_l.
  215.  
  216.      -w   Print a message containing the working directory before
  217.           and  after  other  processing.   This may be useful for
  218.           tracking down errors from complicated nests  of  recur-
  219.           sive _m_a_k_e commands.
  220.  
  221.      -W _f_i_l_e
  222.           Pretend that the target _f_i_l_e has  just  been  modified.
  223.           When  used  with the -n flag, this shows you what would
  224.           happen if you were to modify that file.  Without -n, it
  225.           is  almost  the  same as running a _t_o_u_c_h command on the
  226.           given file before running _m_a_k_e, except that the modifi-
  227.           cation time is changed only in the imagination of _m_a_k_e.
  228.  
  229. SEE ALSO
  230.      /usr/local/doc/gnumake.dvi
  231.                          _T_h_e _G_N_U _M_a_k_e _M_a_n_u_a_l
  232.  
  233. BUGS
  234.      See the chapter `Problems and Bugs' in _T_h_e _G_N_U _M_a_k_e _M_a_n_u_a_l .
  235.  
  236. AUTHOR
  237.      This manual page contributed by  Dennis  Morse  of  Stanford
  238.      University.  It has been reworked by Roland McGrath.
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261. GNU                Last change: 22 August 1989                  4
  262.  
  263.  
  264.  
  265.